package observer;

import java.util.Observable;
import java.util.Observer;

public class CObserver implements Observer{

	private Observable observable;
	private String myNameString;
	
	public CObserver(Observable o){
		this.observable = o;
		this.observable.addObserver(this);
	}
	
	public void setName(String name)
	{
		this.myNameString = name;
	}

	public void update(Observable o, Object arg) {
		System.out.println("I am "+this.myNameString+" I have got answer..");
	}

}
